package com.pg_chat.mapper;

import com.pg_chat.model.MessagesEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.sql.Timestamp;
import java.util.List;

@Mapper
public interface MessageMapper {


    //获取房间数据 by userId friendId

    //生成房间记录 by userId friendId

    //时间获取时间范围内记录
    List<MessagesEntity> queryMessagesByTime(@Param("userA") int userA
                                            ,@Param("userB") int userB
                                            ,@Param("start") Timestamp start
                                            ,@Param("end") Timestamp end);

    List<MessagesEntity> queryMessagesByTimePlus(MessagesEntity m
            , Timestamp end);

}
